import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'

/* 引入样式 start */
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/display.css'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import '@/styles/index.scss' // global css
/* 引入样式 end */

/* Vue.use start */
import ElementUI from 'element-ui' // use ElementUI
Vue.use(ElementUI)
import fullscreen from 'vue-fullscreen' //引入全屏组件
Vue.use(fullscreen)
/* Vue.use end */

/* 组件注册  start*/
import 'echarts/lib/chart/line' //  手动导入ECharts模块以减小包的大小
import ECharts from 'vue-echarts'
Vue.component('v-chart', ECharts) // 注册echart组件
import VContainer from 'components/VContainer'
Vue.component('VContainer', VContainer) //注册垂直三段式组件
import customTable from 'components/CustomTable'
Vue.component('customTable', customTable) // 自定义表格组件
/* 组件注册  end*/

/* 注册filter start */
import * as filters from './filters'
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})
/* 注册filter end */

/* 其他 start */
import '@/permission' // permission control
require('promise.prototype.finally').shim() //为promise添加finally
Vue.config.productionTip = false
/* 其他 end */

new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App)
})
